#ifndef __Scene_Camera_h__
#define __Scene_Camera_h__

#include "Scene/Transformable.h"

namespace vital {

	//--------------------------------------------------------------------------
	class TCamera : public TTransformable {

	public:

		enum PROJECTION_MODE {
			PERSPECTIVE, 
			ORTHOGRAPHIC,
		};

		TCamera();
		~TCamera();

		TMtx4 getViewMatrix();
		TMtx4 getProjMatrix();

		void setViewParam(float fov, float apsect, float zNear, float zFar);

		void toggleProjectionMode();
		PROJECTION_MODE getProjectionMode();
		void setProjectionMode(PROJECTION_MODE mode);

		bool getReflectMtxEnabled();
		void setReflectMtxEnabled(bool value);

		void buildReflectMtx(const TVec4 &reflectPlane);

	private:
		float mFov;
		float mAspect;
		float mZNear;
		float mZFar;

		bool mViewParamDirty;

		bool mReflectMtxEnabled;

		TMtx4 mProjMtxP;
		TMtx4 mProjMtxO;
		TMtx4 mReflectMtx;

		PROJECTION_MODE mProjMode;

		void updateProjectionMatrix();

	};

}

#endif	// __Scene_Camera_h__